home *** CD-ROM | disk | FTP | other *** search
- /* rexx macro */
-
- options results /* enable return codes */
-
- if (left(address(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
-
- address 'GOLDED.1'
-
- 'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */
-
- if (RC ~= 0) then
-
- exit
-
- options failat 6 /* ignore warnings */
-
- signal on syntax /* ensure clean exit */
-
- /* ------------------------- INSERT YOUR CODE HERE: -------------------- */
-
- /* INPUT: COMMAND/K */
-
- parse upper arg COMMAND .
-
- 'QUERY CAT'
-
- if (RESULT = "deutsch") then do
-
- STRING.sSTARTINGSHELL = "Starten der StormC-Shell..."
- STRING.sSTORMSHELL = "Kann die StormC-Shell nicht starten !"
- STRING.sSTORMRUNERR = "Kann die StormC-Laufzeitumgebung nicht|finden !"
- STRING.sSTARTINGRUN = "Laufzeitumgebung wird gestartet..."
- end
- else do
-
- STRING.sSTARTINGSHELL = "Starting StormC-Shell..."
- STRING.sSTORMSHELL = "Can not start the StormC shell !"
- STRING.sSTORMRUNERR = "Can not find the run-time environment !"
- STRING.sSTARTINGRUN = "Starting run-time environment..."
- end
-
- call run_stormc
-
- if (~show('P', 'STORMRUN')) then do
-
- 'QUERY SCREEN VAR=SCREEN'
-
- 'REQUEST STATUS="' || STRING.sSTARTINGRUN || '"'
-
- 'RUN CMD="stormc:stormsys/stormrun golded pubscreen=*"' || SCREEN || '*"" ASYNC STACK=16384 WAITPORT="STORMRUN" SECONDS=10'
-
- 'REQUEST STATUS=""'
-
- if (~show('P', 'STORMRUN')) then do
-
- 'REQUEST PROBLEM="' || .sSTORMRUNERR || '"'
-
- 'UNLOCK'
-
- exit
- end
- end
-
- if (COMMAND ~= "") then do
-
- options failat 25
-
- address 'STORMRUN' COMMAND
- end
-
- /* ---------------------------- END OF YOUR CODE ----------------------- */
-
- 'UNLOCK' /* VERY important: unlock GUI */
- EXIT
-
- SYNTAX:
-
- SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
- 'UNLOCK'
- EXIT
-
- /* /// "run_stormc" */
-
- run_stormc: procedure EXPOSE STRING.
-
- if (~show('P', 'STORMSHELL')) then do
-
- if (exists("stormc:stormsys/stormshell")) then do
-
- 'REQUEST STATUS="' || STRING.sSTARTINGSHELL || '"'
-
- 'QUERY PATH VAR=PATH'
-
- 'QUERY SCREEN VAR=SCREEN'
-
- 'RUN ASYNC CMD="stormc:stormsys/stormshell golded pubscreen=*"' || SCREEN || '*"" WAITPORT="STORMSHELL" SECONDS=10 STACK=16384 DIR="' || PATH || '"'
-
- 'REQUEST STATUS=""'
- end
- end
-
- if (~show('P', 'STORMSHELL')) then do
-
- 'REQUEST PROBLEM="' || STRING.sSTORMSHELL || '"'
-
- 'UNLOCK'
-
- exit
- end
-
- return
-
- /* /// */
-